<?php
defined('ROOTPATH') OR exit('Forbidden');

class input {

    public static function get($param) {
        $string = $_GET[$param];
        return self::filter($string);
    }

    public static function post($param) {
        $string = $_POST[$param];
        return self::filter($string);
    }

    private static function filter($string) {
        // 防止xss攻击
        $string = htmlspecialchars($string);
        return $string;
    }
}
